cmake_minimum_required(VERSION 2.6)
project(Realmd)

include_directories(
    ${PROJECT_SOURCE_DIR}
    ${PROJECT_SOURCE_DIR}/../
)

set(Realmd_SRC
    Application.h
    Application.cc
    RealmdSystem.h
    RealmdSystem.cc
    Global.h
    RealmList.h
    RealmList.cc
    AuthCode.h
    
    Net/AuthSocketHandler.h
    Net/AuthSocketHandler.cc
    Net/AuthSocketHandlerFactory.h
)

if(WIN32)
    set(Realmd_SRC
        Main_WIN32.cc
        Realmd.rc
    ${Realmd_SRC})
endif()

add_executable(Realmd ${Realmd_SRC})
target_link_libraries(Realmd
    Shared
    ${Libevent_Libraries}
    ${MySQL_Libraries}
    ${OpenSSL_Libraries}
)
if (WIN32)
target_link_libraries(Realmd 
    ws2_32 
)
endif()